﻿#include "gamecontroller.h"

#include <QMessageBox>

GameController::GameController(TetrisBoard *board, QObject *parent)
    : QObject(parent),board(board)
{

}

void GameController::startGame()
{
    board->start();
}

void GameController::pauseGame()
{
    board->pause();
}

void GameController::gameOver()
{
    QMessageBox::warning(nullptr,u8"提示",u8"游戏失败，少侠仍需努力！请重新开始游戏！");
    board->start();
}
